package cn.xfdzx.android.apps.shop.fragment.type.model;

import cn.xfdzx.android.apps.shop.base.BaseModelImpl;
import cn.xfdzx.android.apps.shop.base.NetCallBack;
import cn.xfdzx.android.apps.shop.base.NetCallBackImpl;
import cn.xfdzx.android.apps.shop.bean.CategoryAllBeen;
import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.HomeSearchXFDGoodBeen;
import cn.xfdzx.android.apps.shop.fragment.home.response.HomeNearShop;
import cn.xfdzx.android.apps.shop.fragment.type.contract.MarketClassificationContract;
import cn.xfdzx.android.apps.shop.fragment.type.request.AddCart;
import cn.xfdzx.android.apps.shop.fragment.type.request.CateAll;
import cn.xfdzx.android.apps.shop.net.RetrofitClient;

public class MarketClassificationModel extends BaseModelImpl implements MarketClassificationContract.Model {

    @Override
    public void getClassoficationData(String status, NetCallBackImpl<CategoryAllBeen> categoryAllBeen) {
        loadData(RetrofitClient.getInstance().getApi().categoryAll(status), categoryAllBeen);

    }

    @Override
    public void getListAll(CateAll cateAll, NetCallBackImpl<HomeSearchXFDGoodBeen> callBack) {
        loadData(RetrofitClient.getInstance().getApi().getGoodsList(cateAll.getMap()), callBack);
    }

    @Override
    public void addCart(AddCart addCart, NetCallBack<ConfirmGoodBeen> callBack) {
        loadData(RetrofitClient.getInstance().getApi().addCart(addCart.getMap()), callBack);
    }
}
